Merge "Add meta=userinfo&uiprop=latestcontrib"
[lhc/web/wiklou.git] / resources / src / mediawiki.widgets / mw.widgets.DateInputWidget.js
index c7502da..c25db2f 100644 (file)
                        focusout: this.onBlur.bind( this )
                } );
                this.calendar.$element.on( {
+                       focusout: this.onBlur.bind( this ),
                        click: this.onCalendarClick.bind( this ),
                        keypress: this.onCalendarKeyPress.bind( this )
                } );
                                if ( e.which === OO.ui.Keys.TAB ) {
                                        if ( e.shiftKey ) {
                                                // Tabbing backward from text input: normal browser behavior
-                                               $.noop();
                                        } else {
                                                // Tabbing forward from text input: just focus the calendar
-                                               this.calendar.$element.focus();
+                                               this.calendar.$element.trigger( 'focus' );
                                                return false;
                                        }
                                }
                                if ( e.which === OO.ui.Keys.TAB ) {
                                        if ( e.shiftKey ) {
                                                // Tabbing backward from calendar: just focus the text input
-                                               this.textInput.$input.focus();
+                                               this.textInput.$input.trigger( 'focus' );
                                                return false;
                                        } else {
                                                // Tabbing forward from calendar: focus the text input, then allow normal browser
                                                // behavior to move focus to next focusable after it
-                                               this.textInput.$input.focus();
+                                               this.textInput.$input.trigger( 'focus' );
                                        }
                                }
                        }.bind( this ) );
                if ( userSelected ) {
                        // Prevent focusing the handle from reopening the calendar
                        this.closing = true;
-                       this.$handle.focus();
+                       this.$handle.trigger( 'focus' );
                        this.closing = false;
                }
 
                this.textInput.toggle( true );
                this.calendar.toggle( true );
 
-               this.textInput.$input.focus();
+               this.textInput.$input.trigger( 'focus' );
        };
 
        /**